package br.com.assinchronus.componentes;

import java.io.Serializable;

public class Casa implements Serializable {

	private static final long serialVersionUID = 1L;

	private int valor = 0;
	private Pecas peca = null;
	private int posicao = 0;

	public Pecas getPeca() {
		return peca;
	}

	public void setPeca(Pecas peca) {
		this.peca = peca;
	}

	public int getValor() {
		return valor;
	}

	public void setValor(int valor) {
		this.valor = valor;
	}

	public int getPosicao() {
		return posicao;
	}

	public void setPosicao(int posicao) {
		this.posicao = posicao;
	}
	
	@Override
	public String toString() {
		return "Casa ".concat(String.valueOf(posicao));
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + posicao;
		result = prime * result + valor;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Casa other = (Casa) obj;
		if (posicao != other.posicao)
			return false;
		if (valor != other.valor)
			return false;
		return true;
	}
}
